#include("/common/_body.html")

#define page_content()
<div class="row">
	<div class="col-sm-12 search-collapse">
		<form id="sff" class="form-inline">
			<div class="form-group">
				<label class="control-label">用户名</label>
				<input type="text" class="form-control stext" name="user.user_name">
			</div>
			<div class="form-group">
				<a class="btn btn-success btn-sm no-border btn-round" onclick="$.table.search()"><i class="fa fa-search"></i>&nbsp;搜索</a>
			    <a class="btn btn-warning btn-sm no-border btn-round" onclick="$.form.reset()"><i class="fa fa-refresh"></i>&nbsp;重置</a>
			</div>
		</form>
	</div>
	<div id="toolbar">
		#auth_has("user_save")
       	<a class="btn btn-info btn-xs no-border" onclick="$.table.add()">
			<i class="fa fa-plus"></i> 添加
		</a>
        #end
        #auth_has("user_update")
        <a class="btn btn-success btn-xs no-border disabled btn-single" onclick="$.table.edit()">
            <i class="fa fa-edit"></i> 修改
        </a>
        #end
        #auth_has("user_delete")
        <a class="btn btn-danger btn-xs no-border disabled btn-multiple" onclick="$.table.delete()">
        	<i class="fa fa-remove"></i> 删除
        </a>
        #end
    </div>
	<div class="col-sm-12 select-table">
	    <table id="ey_grid">
	    	<thead>
	            <tr>
	            	<th data-options="field:'ck',checkbox:true"></th>
	                <th data-options="field:'id',hidden:true">用户ID</th>
					<th data-options="field:'user_name',width:80,sortable:true">用户名称</th>
					<th data-options="field:'real_name',width:80">真实姓名</th>
	                <th data-options="field:'user_phone',width:60">用户电话</th>
	                <th data-options="field:'status',width:40,formatter: function(value,row,index){
	                	return dics['user_status'][value]
	                }
	                ">用户状态</th>
	                <th data-options="field:'create_time',width:80,formatter: function(value,row,index){
	                	return $.common.time(value)
	                }
	                ">操作时间</th>
	            </tr>
	        </thead>
	    </table>
	</div>
</div>
#end

#define js()
<script>
	// js中如果用到权限和字典项目，先定义这两个变量，然后获取。
	var dics = #dic_json("user_status");
</script>
<script src="#(path)/js/templates/pdc/user_list.js"></script>
#end